// 云函数入口文件
const addDaka = require('./addDaka/index')
const addUserInfo = require('./addUserInfo/index')
const getRecords = require('./getRecords/index')
const getDaka = require('./getDaka/index')
const addRecords = require('./addRecords/index')

// 云函数入口函数
exports.main = async (event, context) => {
  console.log(event.type)
  switch(event.type){
    case 'getRecords':
      return await getRecords.main(event,context);
    case 'addDaka':
      return await addDaka.main(event,context);
    case 'addUserInfo':
      return await addUserInfo.main(event,context);
    case 'getDaka':
      return await getDaka.main(event,context);
    case 'addRecords':
      return await addRecords.main(event,context);

  }
}